package com.magenta.maxoptra.gis.datasources;

import com.magenta.maxoptra.gis.datasources.jaxb.ColumnType;

/**
 * @author Sergey Grachev
 */
public final class GisTableColumn extends BaseClass {

    private final String alias;

    GisTableColumn() {
        this.isNull = true;
        this.alias = this.name = null;
    }

    GisTableColumn(final ColumnType columnType) {
        this.alias = columnType.getAlias();
        this.name = columnType.getName();
    }

    /**
     * Internal name of column
     */
    public String alias() {
        return alias;
    }

    /**
     * External name of column
     */
    public String name() {
        return name;
    }

    @Override
    public String toString() {
        return "GisTableColumn{" +
                "alias='" + alias + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
